using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._ContingentValues
{
    /// <summary>
    /// <para>Add Contingent Value</para>
    /// <para>Adds a contingent value to a field group on a feature class or table.</para>
    /// <para>将条件值添加到要素类或表上的字段组。</para>
    /// </summary>    
    [DisplayName("Add Contingent Value")]
    public class AddContingentValue : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddContingentValue()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_target_table">
        /// <para>Target Table</para>
        /// <para>The input geodatabase feature class or table to which the contingent value will be added.</para>
        /// <para>要向其添加条件值的输入地理数据库要素类或表。</para>
        /// </param>
        /// <param name="_field_group_name">
        /// <para>Field Group Name</para>
        /// <para>The field group to which the contingent value will be added.</para>
        /// <para>将条件值添加到的字段组。</para>
        /// </param>
        /// <param name="_values">
        /// <para>Values</para>
        /// <para><xdoc>
        ///   <para>The field name, field value type, and associated field values to be used for the new contingent value.
        ///   <bulletList>
        ///     <bullet_item>Field Name—The name of the field that participates in the field group  </bullet_item><para/>
        ///     <bullet_item>Field Value Type—The type of contingent value. The Any and Null types will ignore any value specified in the Field Value field.
        ///       <bulletList>
        ///         <bullet_item>Any—The value can be any field value.      </bullet_item><para/>
        ///         <bullet_item>Null—The value is null.      </bullet_item><para/>
        ///         <bullet_item>Coded Value—The value is from a coded value domain.      </bullet_item><para/>
        ///         <bullet_item>Range—The value is a min/max subset of a range domain.      </bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>Field Value—The specific field value. If the Field Value Type is Coded Value, specify the code description. If the Field Value Type is Range, specify the minimum and maximum values in the format min;max (for example, 10;100).  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>字段名称、字段值类型和要用于新条件值的关联字段值。
        ///   <bulletList>
        ///     <bullet_item>字段名称 - 参与字段组的字段的名称</bullet_item><para/>
        /// <bullet_item>字段值类型 - 条件值的类型。Any 和 Null 类型将忽略“字段值”字段中指定的任何值。
        ///       <bulletList>
        ///         <bullet_item>任意 - 值可以是任意字段值。</bullet_item><para/>
        ///         <bullet_item>Null - 值为 null。</bullet_item><para/>
        ///         <bullet_item>编码值 - 该值来自编码值属性域。</bullet_item><para/>
        ///         <bullet_item>范围 - 该值是范围属性域的最小/最大子集。</bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>字段值 - 特定字段值。如果“字段值类型”为“编码值”，请指定代码说明。如果“字段值类型”为“范围”，则以 min 格式指定最小值和最大值;最大值（例如，10;100). </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        public AddContingentValue(object _target_table, object _field_group_name, object _values)
        {
            this._target_table = _target_table;
            this._field_group_name = _field_group_name;
            this._values = _values;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Add Contingent Value";

        public override string CallName => "management.AddContingentValue";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_target_table, _field_group_name, _values, _subtype, _retire_value.GetGPValue(), _out_table];

        /// <summary>
        /// <para>Target Table</para>
        /// <para>The input geodatabase feature class or table to which the contingent value will be added.</para>
        /// <para>要向其添加条件值的输入地理数据库要素类或表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_table { get; set; }


        /// <summary>
        /// <para>Field Group Name</para>
        /// <para>The field group to which the contingent value will be added.</para>
        /// <para>将条件值添加到的字段组。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Field Group Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _field_group_name { get; set; }


        /// <summary>
        /// <para>Values</para>
        /// <para><xdoc>
        ///   <para>The field name, field value type, and associated field values to be used for the new contingent value.
        ///   <bulletList>
        ///     <bullet_item>Field Name—The name of the field that participates in the field group  </bullet_item><para/>
        ///     <bullet_item>Field Value Type—The type of contingent value. The Any and Null types will ignore any value specified in the Field Value field.
        ///       <bulletList>
        ///         <bullet_item>Any—The value can be any field value.      </bullet_item><para/>
        ///         <bullet_item>Null—The value is null.      </bullet_item><para/>
        ///         <bullet_item>Coded Value—The value is from a coded value domain.      </bullet_item><para/>
        ///         <bullet_item>Range—The value is a min/max subset of a range domain.      </bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>Field Value—The specific field value. If the Field Value Type is Coded Value, specify the code description. If the Field Value Type is Range, specify the minimum and maximum values in the format min;max (for example, 10;100).  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>字段名称、字段值类型和要用于新条件值的关联字段值。
        ///   <bulletList>
        ///     <bullet_item>字段名称 - 参与字段组的字段的名称</bullet_item><para/>
        /// <bullet_item>字段值类型 - 条件值的类型。Any 和 Null 类型将忽略“字段值”字段中指定的任何值。
        ///       <bulletList>
        ///         <bullet_item>任意 - 值可以是任意字段值。</bullet_item><para/>
        ///         <bullet_item>Null - 值为 null。</bullet_item><para/>
        ///         <bullet_item>编码值 - 该值来自编码值属性域。</bullet_item><para/>
        ///         <bullet_item>范围 - 该值是范围属性域的最小/最大子集。</bullet_item><para/>
        ///       </bulletList>
        ///     </bullet_item><para/>
        ///     <bullet_item>字段值 - 特定字段值。如果“字段值类型”为“编码值”，请指定代码说明。如果“字段值类型”为“范围”，则以 min 格式指定最小值和最大值;最大值（例如，10;100). </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Values")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _values { get; set; }


        /// <summary>
        /// <para>Subtype</para>
        /// <para>The input table subtype to which the contingent value will be added.</para>
        /// <para>条件值将添加到的输入表子类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Subtype")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _subtype { get; set; } = null;


        /// <summary>
        /// <para>Retire Value</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the contingent value will be retired. The contingent value is considered retired when it is no longer created but can still be used in an existing field. When a contingent value is retired, it will still be shown in the list of valid values for a field, such as in the Attribute pane, but it will be inactive and you won't be able to select it as a field value. An example is using asbestos as a building material. New construction cannot use asbestos as a building material, but existing structures may still have this attribute.
        ///   <bulletList>
        ///     <bullet_item>Checked—The contingent value will be retired.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The contingent value will not be retired. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否停用条件值。当条件值不再创建但仍可在现有字段中使用时，该值被视为已停用。停用条件值后，该条件值仍将显示在字段的有效值列表中，例如在属性窗格中，但它将处于非活动状态，您将无法将其选为字段值。一个例子是使用石棉作为建筑材料。新建筑不能使用石棉作为建筑材料，但现有结构可能仍具有此属性。
        ///   <bulletList>
        ///     <bullet_item>选中 - 条件值将被停用。</bullet_item><para/>
        ///     <bullet_item>未选中 - 条件值不会被停用。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Retire Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _retire_value_value _retire_value { get; set; } = _retire_value_value._false;

        public enum _retire_value_value
        {
            /// <summary>
            /// <para>RETIRE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("RETIRE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_RETIRE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_RETIRE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_table { get; set; }


        public AddContingentValue SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}